<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	template="/template/LayoutCliente.xhtml">


	<f:metadata>
		<f:viewAction action="#{tarefaController.buscarTodasTarefa}" />
	</f:metadata>


	<ui:define name="content">
	
	<f:metadata>
		<f:event type="preRenderView" listener="#{loginController.testeSessaoCliente}"/> 
	</f:metadata>
		<p:panel id="prjHeader" header="Projeto: #{projetoController.projetoSelecionado.nome}">
			<h:form id="adm" style="text-align:center;">
				<p:commandLink id="dadosPrj"  style="margin-right:100px" value="Dados do Projeto" action="#{loginController.redirectDadosProjeto}"/>
				<p:commandLink id="backlog"		style="margin-right:100px" value="Backlog" action="#{loginController.redirectBacklog}" />
				<p:commandLink id="taskboard"	style="margin-right:100px" value="TaskBoard" action="#{loginController.redirectTaskBoard}"/>
				<p:outputLabel id="burndown"  style="margin-right:100px;color:blue;font-weight:bold;" value="BurnDown Chart" />
			</h:form>
	</p:panel>
				<h:form id="burndownForm">
					<p:lineChart value="#{burndownController.burnDownChart}"
						legendPosition="ne" minY="0" yaxisLabel="Horas" xaxisLabel="Dias" zoom="true" animate="true"
						title="Burndown Chart"
						style="width:100%; height:100%; text-align:center;" />
				</h:form>
				
				<p:panel style="text-align:left; width:30%" >
					<p:outputLabel value="TEMPO TOTAL DO PROJETO: " style="font-weight: bold;"/>
					<p:outputLabel value=" #{burndownController.tempoTotalProjeto} Horas" style="color:blue;"/>
					<br></br>
					<p:outputLabel value="TEMPO RESTANTE DO PROJETO: " style="font-weight: bold;"/>
					<p:outputLabel value=" #{burndownController.tempoRestanteProjeto} Horas" style="color:green;" rendered="#{burndownController.tempoRestanteProjeto == 0}"/>
					<p:outputLabel value=" #{burndownController.tempoRestanteProjeto} Horas" style="color:red;" rendered="#{burndownController.tempoRestanteProjeto != 0}"/>
				</p:panel>
	</ui:define>
</ui:composition>